Skip to main content

Sort Data Table Multi Cols

AutomatR.DefaultActivities.Datatable.SortDataTableMultiCols

The "Sort Data Table Multi Cols" activity in AutomatR facilitates sorting an entire DataTable based on ascending or descending order, considering the values of one or more specified columns. This activity is beneficial for organizing data in a structured manner, enhancing the efficiency of subsequent workflow processes.

Properties

NameDescription
Input
Data TableEnter the DataTable variable on which sorting needs to be performed. DataTable variable or argument.
Sort ExpressionClick the "Set Sort" button to invoke a wizard that prefills the sort expression based on the selected columns. String variable or argument.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variable or argument containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Sort Data Table Multi Cols" activity. This can be useful for handling synchronization issues. Integer variable or argument containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
Output
ResultStores the sorted DataTable extracted from the activity. DataTable variable or argument.

How to use:

  1. Drag and drop the "Sort Data Table Multi Cols" activity onto the workflow.
  2. Configure the properties by specifying the DataTable variable on which sorting is to be performed and the sort expression using the "Set Sort" button.
  3. Optionally, configure the delay and customize the display name.
  4. Execute the workflow to obtain the sorted DataTable based on the specified columns.

Example: Consider an example where the "Sort Data Table Multi Cols" activity is used to sort a DataTable named "employeeData" based on the columns "Salary" in ascending order and "EmployeeName" in descending order:

Sort Data Table Multi Cols:
Display Name: "Sort Employee Data"
Data Table: employeeData
Sort Expression: "Salary ASC, EmployeeName DESC"
Result: sortedEmployeeData

In this example, the activity sorts the "employeeData" DataTable based on the specified columns, and the result is stored in the "sortedEmployeeData" DataTable variable for further use in the workflow.